<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改订单')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-ncOrder-edit" th:object="${ncOrder}">
        <input id="orderId" name="orderId" th:field="*{orderId}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">单号：</label>
            <div class="col-sm-8">
                <input id="orderCode" readonly name="orderCode" th:field="*{orderCode}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">时间：</label>
            <div class="col-sm-8">
                <input id="checkTime"  data-format="yyyy-MM-dd HH:mm:ss" data-type="datetime"  required name="orderTime" th:value="*{#dates.format(orderTime, 'yyyy-MM-dd HH:mm:ss')}" type="datetime" class="time-input" >
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">经手人：</label>
            <div class="col-sm-8">
                <input id="createBy" name="createBy" th:field="*{createBy}" class="form-control" type="text">
            </div>
        </div>


        <div class="form-group">
            <label class="col-sm-3 control-label">出库类型：</label>
            <div class="col-sm-8">
                <select name="outputType" class="form-control m-b" th:with="type=${@dict.getType('cforderType')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
                            th:field="*{outputType}"></option>
                </select>
            </div>
        </div>
        <!--<div class="form-group">
            <label class="col-sm-3 control-label">状态 1：执行中 2：已完成：</label>
            <div class="col-sm-8">
                <input id="status" name="status" th:field="*{status}" class="form-control" type="text">
            </div>
        </div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <textarea rows="4" id="remark" name="remark" th:field="*{remark}" class="form-control"
                          type="text"></textarea>
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "system/ncOrder";
    $("#form-ncOrder-edit").validate({
        rules: {
            xxxx: {
                required: true,
            },
        },
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-ncOrder-edit').serialize());
        }
    }
</script>
</body>
</html>
